/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Trabalho3.PasswordChecker;

import Trabalho3.RegrasPasswordChecker02.*;
import java.util.ArrayList;

/**
 *
 * @author geraldo
 */
public class PasswordChecker02 extends PasswordChecker{

    public PasswordChecker02(String password) {
    this.regras = new ArrayList<>();
    regras.add(new RegraTamanho02(password));
    regras.add(new RegraBonusDigitos(password));
    regras.add(new RegraBonusMaiusculas(password));
    regras.add(new RegraBonusMinusculas(password));
    regras.add(new RegraBonusNaoLiteraisIntermediarios(password));
    regras.add(new RegraBonusRequerimentos(password));
    regras.add(new RegraBonusSimbolos(password));
    regras.add(new RegraDescontoCaracteresRepetidos(password));
    regras.add(new RegraDescontoDigitosConsecutivos(password));
    regras.add(new RegraDescontoLetrasMaiusculasConsecutivas(password));
    regras.add(new RegraDescontoLetrasMinusculasConsecutivas(password));
    regras.add(new RegraDescontoSequenciaDigitos(password));
    regras.add(new RegraDescontoSequenciaLetras(password));
    regras.add(new RegraDescontoSequenciaSimbolos(password));
    regras.add(new RegraDescontoSomenteLetras(password));
    regras.add(new RegraDescontoSomenteDigitos(password));
    }
    
    @Override
    public String classificarSenha(){
        int pontos = this.calcularForcaDeSenha();
        if (pontos>100) pontos = 100;
        else if (pontos<0) pontos = 0;
        return new Veredicto02().gerarVeredicto(pontos);
    }
}
    
    
    

